package com.shihc.spring.transaction.service;

import com.shihc.spring.transaction.model.User;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by shihc on 2016/1/21.
 */
public interface IUserService {
    User saveUser(User user);

    int deleteUser(User user);

    //readOnly=false时
    //@Transactional(readOnly = true)
    //删除会触发两条sql知心
    @Transactional
    int deleteUser2(User user);
}
